﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Reflection;
using System.Text;
using System.Windows.Forms;

namespace ProgramMain.Classifiers
{
    public partial class FrmVertexTypes : ProgramMain.Framework.frmBase
    {
        public FrmVertexTypes()
        {
            InitializeComponent();

            UniqueIdent = GenerateFormIdent();
        }

        private static string GenerateFormIdent()
        {
            return GenerateUniqueIdent(MethodInfo.GetCurrentMethod().DeclaringType.Name);
        }

        public static FrmVertexTypes ShowForm()
        {
            string FormIdent = GenerateFormIdent();
            FrmVertexTypes frm = (FrmVertexTypes)FindForm(FormIdent);
            if (frm != null)
            {
                frm.Activate();
            }
            else
            {
                frm = new FrmVertexTypes();
                frm.ShowAsMDI(Program.MainForm);
                frm.RefreshForm();
            }
            return frm;
        }

        public void RefreshForm()
        {
            vertexTypeList1.RefreshControl();
        }
    }
}
